<?php 
	$sysApps = new sysApps();
?>

<div class="account-info">
    <div class="pageTitle">Payment Info</div>
    
    <p>
    Please select your bank<br />

    <select id="select_bank" name="select_bank">
        <option value="" selected="selected">Select a Bank</option>
        <option value="ABB">Ambank Berhad</option>
        <option value="AFB">Affin Bank Berhad</option>
        <option value="AGB">Agro Bank Berhad</option>
        <option value="BAR">Bank Al-Rajhi</option>
        <option value="BIMB">Bank Islam Malaysia Berhad</option>
        <option value="BMT">Bank Muamalat Malaysia Berhad</option>
        <option value="BRB">Bank Rakyat Berhad</option>
        <option value="BSN">Bank Simpanan Nasional Berhad</option>
        <option value="CIMB">CIMB Bank Berhad</option>
        <option value="CSS">CASH TO COMPANY</option>
        <option value="EON">EON Bank Berhad</option>
        <option value="HLB">Hong Leong Bank Berhad</option>
        <option value="HSB">HSBC Bank Malaysia Berhad</option>
        <option value="LTH">Lembaga Tabung Haji</option>
        <option value="MBA">AUSTRALIA - Malayan Banking Berhad (MAYBANK)</option>
        <option value="MBB">Malayan Banking Berhad (MAYBANK)</option>
        <option value="MBE">BRUNEI - Malayan Banking Berhad (MAYBANK)</option>
        <option value="MBS">SINGAPURA - Malayan Banking Berhad (MAYBANK)</option>
        <option value="PBB">Public Bank Berhad</option>
        <option value="RHB">RHB Bank Berhad</option>
    </select>
    </p>
    
    <p>
    Please enter you bank acc No <br />
    <input type="text" id="bank_accno" class="inputTextbox" name="bank_accno" />
    	
    </p>
    
    <div class="smallButton">Submit</div>
    <div class="notify"><div class="notify-msg">test</div></div>
</div>       

<script>

$(document).ready(function(){
	
	$('.notify').hide();
	
	$('.smallButton').click(function(){
		var select_bank = $('#select_bank').val();
		var bank_accno = $('#bank_accno').val();
		var id = '<?php echo $_SESSION['user_MGM_id'];?>';
		
		//alert(select_bank);
		
		$.post("<?php echo $sysApps->BASEurl();?>members/func/save-bankinfo.php",{id:id, select_bank:select_bank, bank_accno:bank_accno},function(response){
			switch(response)
			{
			case '1':
			  $('.notify').show("slide",{direction: 'down'});
					$('.notify').delay(2000).hide("slide",{direction: 'up'});
					$('.notify-msg').removeClass("check_error").addClass("check_pass").text("Bank Info Has Been Saved");
					return false;	
			  break;
			
			default:
			$('.notify').show("slide",{direction: 'down'});
					$('.notify').delay(2000).hide("slide",{direction: 'up'});
					$('.notify-msg').removeClass("check_pass").addClass("check_error").text("Something went wrong, Please contact Admnistrator");
					return false;	
			  
			}
		});
		
	});
});

</script>